<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class UsersAddField extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function (Blueprint $table) {
            //
			$table->string('mobile',11)->after('email')->unique();
			$table->string('realname',30)->after('mobile');
			$table->string('avatar',255)->after('realname');
			$table->integer('introducer')->after('realname');
			$table->tinyInteger('status')->after('introducer');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('users', function (Blueprint $table) {
            //
			$table->dropColumn(['mobile', 'realname', 'introducer', 'avatar', 'status']);
        });
    }
}
